<!-- 父组件 -->
<template>
    <div>
        <h3>App</h3>
        <p>App中的num：{{ num }}</p>
        <hr>
        <Child></Child>
    </div>
</template>

<script>
import Child from '@/components/Child.vue'

export default {
    components: {Child},
    data() {
        return {
            num: 0
        }
    },
    methods: {
        addNum() {
            this.num++
        }
    },

}
</script>